import { Modal, Tabs } from "antd";
import TemporaryForm from "@/views/attendance/classInfo/dialog/TemporaryForm";
import StandardForm from "@/views/attendance/classInfo/dialog/StandardForm";

const ClassInfoForm = ({ props = {} }) => {

    const { visible, width, isOpenDialog } = props;

    const tabItems = [
        {
            key: 'temporary',
            label: '临时排班',
            children: <TemporaryForm props={props} />,
        },
        {
            key: 'standard',
            label: '固定排班',
            children: <StandardForm props={props} />,
        },
    ];

    const onCancelHandler = () => {
        isOpenDialog();
    }

    return (
        <Modal
            open={visible}
            width={width}
            // onOk={onSubmitHandler}
            onCancel={onCancelHandler}
            footer={null}
        >
            <Tabs defaultActiveKey="temporary" centered items={tabItems} />
        </Modal>
    );
}

export default ClassInfoForm;